package com.jp.juc;

import java.io.FilePermission;
import java.net.InetAddress;
import java.net.UnknownHostException;

public class Main {
    public static void main(String[] args) {

        System.out.println(" Hello word ");

        try {
            System.out.println(InetAddress.getLocalHost().getHostAddress());
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        System.setSecurityManager(new SecurityManager());
        SecurityManager sm = System.getSecurityManager();
        System.out.println("----");
        FilePermission filePermission = new FilePermission("/use/data", "read");
        sm.checkPermission(filePermission);
    }
}
